package com.cy.pj.Jquery.controller;

import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@RestController
public class doJqueryAjaxController {

    @RequestMapping("/doGet")
    public Map<String,Object> doGet(){
        Map<String,Object> map = new HashMap<>();
        map.put("code",1);
        map.put("message","success");
        return map;
    }
    @RequestMapping("/doAjax")
    public String doAjax(String msg){
        System.out.println("msg"+msg);
        return msg="msg.toUpperCase()"+msg.toUpperCase();
    }
    @PostMapping("/doPost")
    public Map doPost(@RequestParam Map<String,Object> map){
        System.out.println("post="+map);
        return map;
    }
}
